#include<stdio.h>
int i=0;
int mian()
{
    unsigned n;
    printf("Please enter the number of discs:");
    scanf("%d",&n);
    printf("\tneedle:\ta\tb\tc\n");
    movedisc(n,'a','c','b');
    printf("\t Total:%d\n",i);

}
movedisc(n,fromneedle,toneedle,usingneedle)
unsigned n;
char fromneedle, toneedle,usigneedle;
{
    if(n>0)
    {
        movedisc(n-1,fromneedle,usingneedle,toneedle);
        ++i;
        switch (fromneedle)
        {
            case'b':printf("\t[%d]:\t%2d........>%2d\n",i,n,n);
            break;
            case'c':printf("\t[%d]:\t%2d.........>%2d\n",i,n,n);
            break;

        }
        break;
        case'b':swith(toneedle){
            case'a':printf("\t[%d]:\t%2d<.......%2d\n",i,n,n);
            break;
            case'c':printf("\t[%d]:\t\t%2d........>%2d\n",i,n,n);
            break;

        }
        break;
        case'c':switch(toneedle)
        {
            case'a':printf("t[%d]:\t%2d<........%2d\n",i,n,n);
            break;
            case'b':printf("\t[%d]:\t\t%2d<........%2d\n",i,n,n);
            break;
        }
        break;
        
    }
    movedisc(n-1,usingneedle,toneedle,fromneedle);

}
}